﻿@inject IJSRuntime JSRuntime
@using Microsoft.JSInterop;

@if (Visible) {
<pre><code class="hljs xml">@ChildContent</code></pre>
}

@code {
    [Parameter] public RenderFragment ChildContent { get; set; }

    [Parameter] public bool Visible { get; set; } = true;

    protected override void OnAfterRender(bool firstRender) {
        JSRuntime.InvokeAsync<string>("HighlightJSUpdate");
    }
}
